<!DOCTYPE html
          PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html   xmlns   = "http://www.w3.org/1999/xhtml">
<head>
<link rel="STYLESHEET" href="filtersdk.css" type="text/css" />
<title>AviSynthTwoFivePixelType - AviSynth</title>
</head>
<BODY>

<h1><a href="http://www.avisynth.org/AviSynthTwoFivePixelType" style="text-decoration:none">
    AviSynthTwoFivePixelType</a>
    	<p>
	</h1>

<p>The internals of VideoInfo.pixel_type has been completely changed. 
The type has been changed from byte to int, and now contains different information than before.  
This is important when building a Source filter, when you have to set the pixel_type. 
You have to change your constants to reflect this change.</p>


<p>In general filters should not care about these values at all - only if they set or modify them. 
For checking what colorspace the video material is in, use one of the following functions in VideoInfo.</p>


<dl><dd><ul ><li>  bool IsRGB()
</li>
<li>  bool IsRGB24()
</li>
<li>  bool IsRGB32()
</li>
<li>  bool IsYUV()
</li>
<li>  bool IsYUY2()
</li>
<li>  bool IsYV12()
</li>
<li>  bool IsPlanar()
</li>
</ul>
</dd>
</dl>

<p>If you need to set the pixel type, use a syntax like:</p>


<p><tt>vi.pixel_type = VideoInfo::CS_YUY2;  // Version 2.5 syntax</tt></p>


<p>instead of:</p>


<p><tt>vi.pixel_type = VideoInfo::YUY2; // Version 2.0 syntax</tt></p>


<p>Other possibilities are:</p>


<dl><dd><ul ><li>         CS_BGR24,
</li>
<li>         CS_BGR32,
</li>
<li>         CS_YUY2,
</li>
<li>         CS_YV12,  // y-v-u, planar
</li>
<li>         CS_I420,  // y-u-v, planar
</li>
<li>         CS_IYUV   // same as above
</li>
</ul>
</dd>
</dl>

<p>The last two are automatically converted to YV12, so filter writers should not worry about these.</p>


<p>See also <a href="WorkingWithImages.htm">WorkingWithImages</a>.</p>


<h3>Back to <a href="AviSynthTwoFiveSDK.htm">AviSynthTwoFiveSDK</a></h3>
<p><kbd>$Date: 2006/11/24 18:21:25 $<br>
Original version of this document at <a href="http://www.avisynth.org/AviSynthTwoFivePixelType">http://www.avisynth.org/AviSynthTwoFivePixelType</a>
</kbd></p>
</BODY>
</html>
